03. Recap - SQLAlchemy

Recap - Databases and SQLAlchemy

Recap - The material covered in this concept is a refresher and should not be new. If you've never seen this material before, it may be wise to look back on a previous course on Python, Structured Query Language (SQL) for Relational Databases, or SQLAlchemy.

Storing Persistent Data

We often need to store data from session to session. This is most commonly done using a dedicated system called a Database . Within this course, we'll use a tool called SQLAlchemy which is an Object Relational Mapper (ORM) to interface with a simple SQLLite3 database using a few lines of code.

ND004 C03 L01 A04 SQL Alchemy Recap

Try It Yourself!

We've included a notebook below for you to define and play with models in SQLAlchemy.

Remember any text with dotted underlines in the notebook include a recording to help you understand. Hover over and click play movie to hear this recording!

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

Password from User Table

The notebook above includes an SQLite database file called database.db in the same directory as the notebook.

Use this database file and the code provided to load the correct database file and find the password for the username Abe .

Tip : make sure you execute the first code block in the notebook to copy the stubbed database file.

What is Abe's password:

SOLUTION: badpassword